#include "AddCellCommand.h"
#include "FrakOutController.h"

AddCellCommand::AddCellCommand(const QString& text,
                               FrakOutController& controller,
                               const QPointF& sceneCoordinates) :
        QUndoCommand(text), m_sceneCoordinates(sceneCoordinates), m_controller(controller)
{

}

void AddCellCommand::undo()
{
    m_controller.removeCell(m_sceneCoordinates);
}

void AddCellCommand::redo()
{
    m_controller.addCell(m_sceneCoordinates);
}
